<?php
namespace Admin\Model;

use Common\Model\CommonModel;

class SaleModel extends CommonModel {
	protected $softdelete = true;
	protected $deleteTime = 'delete_time';

	public function get_one($sale_id){
	    $sale = M("Sale")->field('s.*, sm.sale_manage_name, sm.balance as upper_balance, sm.give_percent')->alias('s')->join("bdt_sale_manager sm ON sm.id = s.sale_manager_id","LEFT")->where(array("s.id"=>$sale_id))->find();
	    return $sale;
	}

}